package pub.guoxin.oops.manager.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import pub.guoxin.oops.model.Company;

import javax.validation.constraints.NotNull;

/**
 * Created by guoxin on 17-11-16.
 */
@Data
@ApiModel
public class CompanyVo {

    @NotNull
    @ApiModelProperty(value = "公司名称", required = true)
    private String name;
    @NotNull
    @ApiModelProperty(value = "地址", required = true)
    private String address;
    @NotNull
    @ApiModelProperty(value = "纳税识别码", required = true)
    private String taxIdentificationCode;

    public Company createCompany(){
        Company company = new Company();
        company.setAddress(this.address);
        company.setName(this.name);
        company.setTaxIdentificationCode(this.taxIdentificationCode);
        company.init();
        return company;
    }

}
